<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use App\Http\Controllers\Index\IndexController;

// Route::get('/', function () {
//     return view('welcome');
// });
Route::get('/', 'Index\IndexController@index');

//BaseData
Route::get('/base_data', 'BaseData\IndexController@index');
Route::resource('/base_data/category_big', 'BaseData\CategoryBigController');
Route::resource('/base_data/category_contract', 'BaseData\CategoryContractController');
Route::resource('/base_data/category_key_product', 'BaseData\CategoryKeyProductController');
Route::resource('/base_data/category_small', 'BaseData\CategorySmallController');
Route::resource('/base_data/distribution_channel', 'BaseData\DistributionChannelController');
Route::resource('/base_data/project_type', 'BaseData\ProjectTypeController');
Route::resource('/base_data/payer_category', 'BaseData\PayerCategoryController');
Route::resource('/base_data/sales_region', 'BaseData\SalesRegionController');
Route::post('/base_data/sales_office/get_data_by_parent', 'BaseData\SalesOfficeController@getDataByParent');
Route::resource('/base_data/sales_office', 'BaseData\SalesOfficeController');
Route::resource('/base_data/sales_order_type', 'BaseData\SalesOrderTypeController');
Route::resource('/base_data/sales_organization', 'BaseData\SalesOrganizationController');

//BusinessData
Route::get('/business_data', 'BusinessData\IndexController@index');

Route::any('/business_data/salesman/import', 'BusinessData\SalesmanController@import');
Route::resource('/business_data/salesman', 'BusinessData\SalesmanController');

Route::any('/business_data/payer/import', 'BusinessData\PayerController@import');
Route::resource('/business_data/payer', 'BusinessData\PayerController');

Route::any('/business_data/material/import', 'BusinessData\MaterialController@import');
Route::resource('/business_data/material', 'BusinessData\MaterialController');


Route::post('/business_data/invoice_details/update_category_contract', 'BusinessData\InvoiceDetailsController@updateCategoryContract');
Route::post('/business_data/invoice_details/update_special_order_from_material', 'BusinessData\InvoiceDetailsController@updateSpecialOrderFromMaterial');
Route::any('/business_data/invoice_details/special_order/import', 'BusinessData\InvoiceDetailsController@importSpecialOrder');
Route::any('/business_data/invoice_details/import', 'BusinessData\InvoiceDetailsController@import');
Route::resource('/business_data/invoice_details', 'BusinessData\InvoiceDetailsController');

Route::any('/business_data/external_order_details/import', 'BusinessData\ExternalOrderDetailsController@import');
Route::resource('/business_data/external_order_details', 'BusinessData\ExternalOrderDetailsController');

Route::resource('/business_data/predict_invoice_month', 'BusinessData\PredictInvoiceMonthController');
Route::resource('/business_data/predict_invoice_year', 'BusinessData\PredictInvoiceYearController');
Route::resource('/business_data/invoice_target_contract_year', 'BusinessData\InvoiceTargetContractYearController');
Route::resource('/business_data/invoice_target_key_product', 'BusinessData\InvoiceTargetKeyProductController');

Route::any('/business_data/retail_contract_indicator/import', 'BusinessData\RetailContractIndicatorController@import');
Route::resource('/business_data/retail_contract_indicator', 'BusinessData\RetailContractIndicatorController');


//report
Route::get('/report', 'Report\IndexController@index');

Route::get('/report/region_indicator_progress/index', 'Report\RegionIndicatorProgress@index');
Route::post('/report/region_indicator_progress/export', 'Report\RegionIndicatorProgress@export');
Route::post('/report/region_indicator_progress/cache', 'Report\RegionIndicatorProgress@cache');
Route::get('/report/region_indicator_progress/visual', 'Report\RegionIndicatorProgress@visual');

Route::post('/report/region_contract_progress/export', 'Report\RegionContractProgress@export');
Route::post('/report/region_contract_progress/cache', 'Report\RegionContractProgress@cache');
Route::get('/report/region_contract_progress/index', 'Report\RegionContractProgress@index');


Route::post('/report/region_key_product_progress/export', 'Report\RegionKeyProductProgress@export');
Route::post('/report/region_key_product_progress/cache', 'Report\RegionKeyProductProgress@cache');
Route::get('/report/region_key_product_progress/index', 'Report\RegionKeyProductProgress@index');

Route::post('/report/payer_scale/cache', 'Report\PayerScaleController@cache');
Route::get('/report/payer_scale/index', 'Report\PayerScaleController@index');


Route::post('/report/payer_z1_target_progress/cache', 'Report\PayerZ1TargetProgressController@cache');
Route::get('/report/payer_z1_target_progress/index', 'Report\PayerZ1TargetProgressController@index');
